import java.awt.*;
import javax.swing.*;
public class GUI_3 {
    private static void createAndShowGUI(){
        JFrame f = new JFrame("BorderLayout");
        f.setLayout(new BorderLayout());
        f.setSize(300,300);
        f.setLocation(300,200);

        JButton but1 = new JButton("PAGE_START");
        JButton but2 = new JButton("PAGE_END");
        JButton but3 = new JButton("lINE_START");
        JButton but4 = new JButton("LINE_END");
        JButton but5 = new JButton("CENTER");

        f.add(but1,BorderLayout.PAGE_START);
        f.add(but2,BorderLayout.PAGE_END);
        f.add(but3,BorderLayout.LINE_START);
        f.add(but4,BorderLayout.LINE_END);
        f.add(but5,BorderLayout.CENTER);
        f.setVisible(true);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
    public static void main(String[] args) {
        SwingUtilities.invokeLater(GUI_3::createAndShowGUI);
    }
}
